#pragma once

#include <AVUIEffect.h>

namespace AVUI {

class BlurEffect : public Effect
{
public:
    DECLARE_ELEMENT(BlurEffect, Effect);

    BlurEffect();

    KernelType::Enum get_KernelType() { return m_kernelType; }
    void set_KernelType(KernelType::Enum value) { SetValue(get_KernelTypeProperty(), AVUI::BoxValue<int>(value)); } 
    DECLARE_DEPENDENCY_PROPERTY(KernelType);

    float get_Radius() const { return m_radius; }
    void set_Radius(float value) { SetValue(get_RadiusProperty(), AVUI::BoxValue(value)); } 
    DECLARE_DEPENDENCY_PROPERTY(Radius);

    RenderingBias::Enum get_RenderingBias() { return (RenderingBias::Enum)(AVUI::UnboxValue<int>(GetValue(get_RenderingBiasProperty()))); }
    void set_RenderingBias(RenderingBias::Enum value) { SetValue(get_RenderingBiasProperty(), AVUI::BoxValue<int>(value)); } 
    DECLARE_DEPENDENCY_PROPERTY(RenderingBias);

protected:

    virtual TRefCountedPtr<Freezable> CreateInstanceCore() AVUI_OVERRIDE { return object_allocate<BlurEffect>().get_Ptr(); }

private:

    static void StaticConstructor();

    static void RadiusPropertyChanged(DependencyObject* d, DependencyPropertyChangedEventArgs* e);
    static void KernelTypePropertyChanged(DependencyObject* d, DependencyPropertyChangedEventArgs* e);

    KernelType::Enum m_kernelType;
    float m_radius;
    
};

}; // namespace AVUI
